package service

import (
	"naio/config"
)

// 服务中的错误统一返回到handler, 由handler统一处理(panic)
type Service struct {
	AdminService         IAdminService
	BannerService        IBannerService
	CategoryService      ICategoryService
	GridCategoryService  IGridCategoryService
}

func NewService(conf *config.BaseConfig) *Service {
	service := &Service{}
	service.AdminService = NewAdminService(conf)
	service.BannerService = NewBannerService(conf)
	service.CategoryService = NewCategoryService(conf)
	service.GridCategoryService = NewGridCategoryService(conf)
	return service
}

